//
//  DetailCaseCell.m
//  BaseProject
//
//  Created by 王洋 on 2020/8/3.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "DetailCaseCell.h"

@implementation DetailCaseCell

- (void)awakeFromNib {
    [super awakeFromNib];

    self.contentView.backgroundColor = [UIColor whiteColor];
    
//    [self.mainImageView sd_setImageWithURL:[NSURL URLWithString:@"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1596433161602&di=80f71ade6808af9f6d8b0e89fbd9533e&imgtype=0&src=http%3A%2F%2Fphotocdn.sohu.com%2F20151203%2Fmp46135385_1449122435926_6_th_fv23.jpeg"]];    
}

- (void)fillCellWithModel:(CommonOpusModel *)model {
    
    [self.mainImageView sd_setImageWithURL:[NSURL URLWithString:model.transverseImg] placeholderImage:[UIImage imageNamed:@"placeholder"]];
    self.mainTitle.text = model.opusName;
    self.subTitle.text = model.createTime;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self pp_clipCorners:UIRectCornerAllCorners radius:10];
    });
}

@end
